package com.financing.wap.dao.impl;


import java.sql.SQLException;
import java.util.List;
import java.util.Map;
import org.springframework.stereotype.Repository;
import com.financing.wap.dto.FpShopPlayopenApplyDTO;
import com.financing.wap.dao.IFpShopPlayopenApplyDao;
import com.financing.wap.common.SqlName;
/**
 * fp_shop_playopen_apply  
 * 金策师直播平台开通申请 数据访问层实现类
 * @author huqiyun
 *
 */
 
@Repository("fpShopPlayopenApplyDao")
public class FpShopPlayopenApplyDaoImpl extends BaseDaoImpl<FpShopPlayopenApplyDTO, java.lang.Integer> implements IFpShopPlayopenApplyDao {


	@Override
	public int insert(FpShopPlayopenApplyDTO fpShopPlayopenApply) throws SQLException {
		return (Integer) this.sqlMapClientTemplate.insert(SqlName.FpShopPlayopenApplySql.insert, fpShopPlayopenApply);
	}

	@Override
	public void update(FpShopPlayopenApplyDTO fpShopPlayopenApply) throws SQLException {
		this.sqlMapClientTemplate.update(SqlName.FpShopPlayopenApplySql.update, fpShopPlayopenApply);
	}

	@Override
	public void updateForce(FpShopPlayopenApplyDTO fpShopPlayopenApply) throws SQLException {
		this.sqlMapClientTemplate.update(SqlName.FpShopPlayopenApplySql.updateForce, fpShopPlayopenApply);
	}

	@Override
	public void delete(Integer id) throws SQLException {
		this.sqlMapClientTemplate.delete(SqlName.FpShopPlayopenApplySql.delete,id);
	}
	
	@SuppressWarnings("unchecked")	
	@Override
	public List<FpShopPlayopenApplyDTO> queryList(FpShopPlayopenApplyDTO fpShopPlayopenApply) throws SQLException {
		return this.sqlMapClientTemplate.queryForList(SqlName.FpShopPlayopenApplySql.queryList, fpShopPlayopenApply);
	}

	@Override
	public int queryListCount(FpShopPlayopenApplyDTO fpShopPlayopenApply) throws SQLException {
		return (Integer) this.sqlMapClientTemplate.queryForObject(SqlName.FpShopPlayopenApplySql.queryListCount, fpShopPlayopenApply);
	}

	@Override
	public FpShopPlayopenApplyDTO loadById(Integer id) throws SQLException {
		return  (FpShopPlayopenApplyDTO)this.getSqlMapClientTemplate().queryForObject(SqlName.FpShopPlayopenApplySql.loadById,id);
	}

	@Override
	public Class<FpShopPlayopenApplyDTO> getEntityClass() {
		return FpShopPlayopenApplyDTO.class;
	}
 	
}
